import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p002 from './p002';

export default async function a001(fd: IFeidaoAiBrowserComponent) {
	// todo
	const dept = fd.data.node.querySelector<HTMLSelectElement>('[data-id="dept"]');
	const department_no = dept.value === "请选择" ? '' : dept.selectedOptions[0].value;
	const res2 = await nodejs<{ dt: Array<{ project_no: string }> }>('risk-control/zj-000001/s002', {
		filter: { department_no }
	});
	const dt = res2.dt;
	render(fd, dt, p002, 'p002', "inner");
}
